<?php
$isReloadable = true;
require_once("../../../pers/inc.config.php");
require_once OVF_FS_WEB_ROOT.'/app/_inc/inc.session.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/funct.html.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/funct.getHtmlDocList.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/class.ovfForm.php';

$objSess->setReqSV('rcom', 'idAnag', 0);
$idAnag = intval($objSess->getSV('rcom', 'idAnag'));

$sCmdLX = "<a class=\"cmd1\" href=\"../anag/anagView.php?idAnag=".reqVar('idAnag')."&$sXSNQS\" >scheda anagrafica</a>&nbsp;&nbsp;&nbsp;\n";
$sCmdLX .= "&nbsp;&nbsp;&nbsp;<a class=\"cmd1\" href=\"../cont/contList.php?idAnag=".reqVar('idAnag')."&$sXSNQS\" >contatti</a>&nbsp;&nbsp;&nbsp;\n";

// testata sezione anagrafica
$oFormTestaSez = new ovfForm('testasez');
//dbg_($oForm);
$sSql = "SELECT ".$oFormTestaSez->getCampiSelect()
	." FROM ovf_anagrafiche A WHERE A.id_anag = ".$idAnag;
$objDB->query($sSql);
if (!$oFormTestaSez->aCampiDB = $objDB->fetch()) {
	backOnErr("id. errato '".$idAnag."'");
}
$oFormTestaSez->db2form();

$sHtmlAnag = "<table class=\"tab1\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\" align='center'>";
$sHtmlAnag .= getHtmlRigaRif();
$sHtmlAnag .= $oFormTestaSez->getHtmlCampiView();
$sHtmlAnag .= "</table>";

$aOpz['sottotit'] = $sHtmlAnag;

testaHtml(_t('Anagrafe'),_t('Documenti'), $msgPag, 'rcom', $aOpz);
echo getHtmlForm();
echo getHtmlHidden('xsn',XSN);
echo getHtmlHidden('azione','...');
?>
<table class="tab1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <?
   echo getHtmlRigaRif();
   echo getHtmlDocList('anag', $idAnag,$sCmdLX)
   ?>
</table>
<?
echo "</form>\n";
codaHtml();
exit();
